<?php
class ArchiveLogController extends Zend_Controller_Action
{	
	public function init()
	{
		IndexController::initAdmin($this);
	}
	
	public function indexAction()
	{
		$objArchiveLog	= new QArchiveLog($this->AppUI->country);
		$arrResult		= $objArchiveLog->get_all();
		
		$this->view->arrResult	= $arrResult;
	}
	
	public function deleteAction()
	{
		if($this->AppUI->admin_group_id!=GROUP_Administrator)
		{
			header('Location:'.HOST_ADMIN);
			exit;
		}
		
		$strName	= $this->_request->getParam('i', null);
		if($strName)
		{
			$obj	= new QArchiveLog($this->AppUI->country);
			$obj->delete($strName);
			header('Location:'.HOST_ADMIN.'/archive-log');
		}
		exit;
	}
}
?>
